#include "stdafx.h"
#include "SillGenome.h"
SillGenome::SillGenome()
{
}

SillGenome::SillGenome(const double lower, const double upper, unsigned int num):
_boundaries(lower, upper), GenomeType(num)
{
}
SillGenome::SillGenome(const SillGenome &rhs):
_boundaries(rhs._boundaries), GenomeType(rhs.length())
{
}
SillGenome& SillGenome::operator= (const SillGenome& rhs)
{
	if ( this != &rhs )
	{
		length(rhs.length());
		_boundaries = rhs._boundaries;
	}
	return (*this);
}
SillGenome::~SillGenome()
{
}
unsigned int SillGenome::precision(const double &acc)
{
	return digits(_boundaries.upperBound(),
		_boundaries.lowerBound(), acc);
}
double SillGenome::precision() const
{
	return accuracy(_boundaries.upperBound(),
		_boundaries.lowerBound(), length());
}
double SillGenome::upper() const
{
	return _boundaries.upperBound();
}
void SillGenome::upper(const double value)
{
	_boundaries.upperBound(value);
}
double SillGenome::lower() const
{
	return _boundaries.lowerBound();
}
void SillGenome::lower(const double value)
{
	_boundaries.lowerBound(value);
}